<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>
		<h:form id="headerForm">
			<p:menubar autoDisplay="false">
				<p:menuitem value="#{messages['menu.home']}" action="#{cMenuAction.navigateToHome()}" />
				<p:submenu label="#{messages['menu.user']}">
					<p:menuitem value="#{messages['menu.userGroup']}" action="#{cMenuAction.navigateToUserGroup()}" />
					<p:menuitem value="#{messages['menu.users']}" action="#{cMenuAction.navigateToUser()}" />
				</p:submenu>
				<p:menuitem value="#{messages['menu.food']}" action="#{cMenuAction.navigateToFood()}" />
				<p:menuitem value="#{messages['menu.table']}" action="#{cMenuAction.navigateToTable()}" />
				<p:submenu label="#{messages['menu.category']}">
					<p:menuitem value="#{messages['menu.categories']}" action="#{cMenuAction.navigateToCategory()}" />
				</p:submenu>
				<p:submenu label="#{messages['menu.report']}">
					<p:menuitem value="#{messages['menu.orderReport']}" action="#{cMenuAction.navigateToOrderReport()}" />
				</p:submenu>
				<p:menuitem value="#{messages['menu.search']}" action="#{cMenuAction.navigateToSearch()}" />

				<f:facet name="options">
					<h:panelGroup>
						<h:selectOneMenu value="#{languageUtil.selectedLanguage}">
							<f:selectItem itemValue="en" itemLabel="#{messages['language.en']}" />
							<f:selectItem itemValue="tr" itemLabel="#{messages['language.tr']}" />
							<f:ajax event="change" render="@all" listener="#{languageUtil.changeLanguage()}" />
						</h:selectOneMenu>
						<p:commandButton value="#{messages['action.logout']}" action="#{languageUtil.login()}" />
					</h:panelGroup>
				</f:facet>
			</p:menubar>
			<br />
		</h:form>
	</ui:composition>
</body>
</html>
